<AdHocSql xmlns="http://www.galaware.com/adhocsql/1.0">
	<Connections>
		<Connection name="pubs"/>
	</Connections>
	<SqlStatements>
		<Sql>
			<Title>Get Publishers By State</Title>
			<Statement>SELECT * FROM publishers</Statement>
			<Parameters>
				<Parameter name="state" type="string" label="State:" />
			</Parameters>
		</Sql>
		<Sql>
			<Title>Get Authors By State</Title>
			<Statement>SELECT * FROM authors {Parameters} ORDER BY au_lname,au_fname</Statement>
			<Parameters>
				<Parameter name="state" type="string" label="State:" />
			</Parameters>
		</Sql>
		<Sql>
			<Title>Get Titles by Author</Title>
			<Statement>select * from titleview {Parameters} ORDER BY au_lname,au_ord</Statement>
			<Parameters>
				<Parameter name="au_lname" type="string" label="Author Last Name:" />
			</Parameters>
		</Sql>
		<Sql>
			<Title>Get Authors By Royalty Percentage</Title>
			<Statement>declare @tblAuthors table (au_id varchar(11));insert into @tblAuthors exec byroyalty {Parameters};select * from authors a inner join @tblAuthors ta on ta.au_id=a.au_id;</Statement>
			<Parameters>
				<Parameter name="percentage" type="int" label="Percentage (0-100):" />
			</Parameters>
		</Sql>
		<Sql>
			<Title>Get Sales By Store</Title>
			<Statement>select * from stores s inner join sales sa on s.stor_id=sa.stor_id {Parameters} order by city,stor_name,zip</Statement>
			<Parameters>
				<Parameter name="state" type="string" label="State:" />
			</Parameters>
		</Sql>
	</SqlStatements>
</AdHocSql>
